import request from '@/utils/request'

// 分页条件查询成绩
export const queryPageApi = (studentName, moduleName,page, pageSize) =>
    request.get(`/scores?studentName=${studentName}&moduleName=${moduleName}&page=${page}&pageSize=${pageSize}`)

// 新增成绩
export const addApi = (score) => request.post('/scores', score)

// 根据ID查询成绩
export const queryInfoApi = (id) => request.get(`/scores/${id}`)

// 更新成绩
export const updateApi = (score) => request.put('/scores', score)

// 删除成绩
export const deleteApi = (id) => request.delete(`/scores/${id}`)

// 查询全部成绩信息
export const queryAllApi = () => request.get('/scores/list')